package org.suze.springboot.base.op;

/**
 * @description:
 * @Date : 下午2:55 2017/9/11
 * @Author : 石冬冬-Heil Hitler(dongdong.shi@mljr.com)
 */
public class OpResultCommon {

    public static final OpResult SUCCESS = new OpResult(Boolean.TRUE,100);
    public static final OpResult FAILURE = new OpResult(Boolean.FALSE,-100);

    public static OpResult suc(Object data){
        OpResult<Object> opResult = SUCCESS;
        opResult.setData(data);
        return opResult;
    }

    public static OpResult fai(Object data){
        OpResult<Object> opResult = FAILURE;
        opResult.setData(data);
        return opResult;
    }
}
